<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>模糊玻璃效果</title>
    <style>
        .box{
            width: 100vw;
            height: 100vh;
            background: url(https://hbfile.huabanimg.com/img/home/banner/e0c5d472e83937cea19dc16052c070e8502869d113ff2f) 
                no-repeat center;
            background-attachment: fixed;
            display: flex;
            flex-direction: row;
            justify-content: center;
            align-items: center;
        }
        main{
            width: 400px;
            height: 400px;
            box-shadow: 0 0 5px #000;
            /* background-color: rgba(255, 255, 255, .7); */
            position: relative;
            z-index: 1;
            color: #fff;
        }
        main::before{
            content: '';
            display: block;
            position: absolute;
            top: 0; left: 0; right: 0; bottom: 0;
            filter: blur(5px);
            z-index: -1;
            background: url(https://hbfile.huabanimg.com/img/home/banner/e0c5d472e83937cea19dc16052c070e8502869d113ff2f) 
                no-repeat center;
            background-attachment: fixed;
            /* background-size: 100% auto; */
        }
    </style>
</head>
<body>
    <div class="box">
        <main>
            <h1>模糊玻璃效果</h1>
            <p>借助css滤镜的 blur() 函数实现</p>
        </main>
    </div>
</body>
</html>
